<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="youtubeAnalytics_v1.html">YouTube Analytics API</a> . <a href="youtubeAnalytics_v1.reports.html">reports</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#query">query(ids, start_date, end_date, metrics, sort=None, dimensions=None, filters=None, max_results=None, start_index=None)</a></code></p>
<p class="firstline">Retrieve your YouTube Analytics reports.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="query">query(ids, start_date, end_date, metrics, sort=None, dimensions=None, filters=None, max_results=None, start_index=None)</code>
  <pre>Retrieve your YouTube Analytics reports.

Args:
  ids: string, Unique channel or content owner ID for retrieving YouTube Analytics data. Either channel==C or contentOwner==O where 'C' is the encrypted channel ID and 'O' is the content owner name. (required)
  start_date: string, Start date for fetching YouTube Analytics data. All requests should specify a start date formatted as YYYY-MM-DD. (required)
  end_date: string, End date for fetching YouTube Analytics data. All requests should specify an end date formatted as YYYY-MM-DD. (required)
  metrics: string, A comma-separated list of YouTube Analytics metrics. E.g., 'views' or 'likes,dislikes' (required)
  sort: string, A comma-separated list of dimensions or metrics that determine the sort order for YouTube Analytics data. By default the sort order is ascending, '-' prefix causes descending sort order.
  dimensions: string, A comma-separated list of YouTube Analytics dimensions. E.g., 'video', or 'ageGroup,gender'.
  filters: string, A list of dimension filters to be applied to YouTube Analytics data. Multiple filters can be joined together with the ';' character. The returned result table will satisfy both filters. E.g., video==dMH0bHeiRNg;country==IT will restrict the returned stats to the given video and the country Italy.
  max_results: integer, The maximum number of rows to include in the response.
  start_index: integer, An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter (one-based, inclusive).

Returns:
  An object of the form:

    { # Contains a single result table. The table is returned as an array of rows that contain the values for the cells of the table. Depending on the metric or dimension, the cell can contain a string (video ID, country code) or a number (number of views or number of likes).
    "kind": "youtubeAnalytics#resultTable", # Identifier used to mark the structure as a result table.
    "rows": [ # Contains all rows of the result table. Each row contains an array with the values for the columns. The order matches the order of the column information provided in the "columnHeaders" field. If no data is available for the given query, the "rows" element will be omitted from the response. The response for a query with the day dimension will not contain rows for the most recent days.
      [
        "",
      ],
    ],
    "columnHeaders": [ # Contains information about the columns returned in the "rows" fields. The order of the elements matches the order of the corresponding columns in "rows" field.
      {
        "dataType": "A String", # Type of the data in the column (STRING, INTEGER, FLOAT).
        "columnType": "A String", # The type of the column (DIMENSION, METRIC).
        "name": "A String", # The name of the dimension or metric.
      },
    ],
  }</pre>
</div>

</body></html>